The Round function. This function lets you replace a linear function of the input value by the closest integer, multiplied by a constant. The function respects the usual “.5” convention. Thus, the closest integer to e.g., 14.5 is 15, while the closest integer to e.g., -14.5 is 14.
By adjusting the parameters, you can create a large variety of round-off rules. Assume, e.g., that you want to replace the input value by the closest multiple of 0.5. To do this, enter 0.5 into the “a” field, 2 into the “b” field, and 0 into the “c” field.
More generally, let A be a positive number. To replace the input value by the closest multiple of A, enter A into the “a” field, 1/A into the “b” field, and 0 into the “c” field.
You may enter negative parameter values as well. Note however, that the resulting rule reverses the “.5” convention. Assume e.g., that you enter -1 both in the “a” and the “b” fields. Then an input value of 14.5 yields an output value of 14, while an input value of -14.5 yields an output value of -15.